package com.example.demo.vo

import com.example.demo.dbmodels.TDistrict
import java.time.LocalDateTime

class DistrictVo {


    /**
     *  id
     **/
    var id: Int? = null
    /**
     *  病区编号
     **/
    var code: String? = null
    /**
     *  病区名称
     **/
    var name: String? = null
    /**
     *  更新人
     **/
    var update_by: Int?= null
    /**
     *  更新时间
     **/
    var update_time: LocalDateTime?= null
    /**
     *  删除标记
     **/
    var is_del: Boolean?= null



    fun getDistrict(table:List<TDistrict>):List<DistrictVo> {
        table?.let {
            val districtVo = mutableListOf<DistrictVo>()
            table.forEach {
                val data = DistrictVo()
                data.code = it.code
                data.id = it.id
                data.is_del = it.is_del
                data.name = it.name
                data.update_by = it.update_by
                data.update_time = it.update_time
                districtVo.add(data)
            }
            return  districtVo
        }
    }





}